package com.sc.nft.admin.request;

import com.sc.nft.entity.req.EcologyCastGasRequest;
import com.sc.nft.enums.ProductCdkTypeEnum;
import com.sc.nft.enums.RedemptionCodeRuleEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class AddCdkActivityRequest {

    @NotBlank(message = "活动名称不能为空")
    @ApiModelProperty("活动名称")
    private String activityTitle;

    @NotBlank(message = "活动描述不能为空")
    @ApiModelProperty("活动描述")
    private String activityDescription;

    @ApiModelProperty("开始时间")
    @NotNull(message = "开始时间不能为空")
    private String beginTime;

    @ApiModelProperty("结束时间")
    @NotNull(message = "结束时间不能为空")
    private String endTime;

    @ApiModelProperty(value = "cdk类型")
    @NotNull(message = "cdk类型不能为空")
    private ProductCdkTypeEnum productType;

    @ApiModelProperty("商品名称")
    @NotBlank(message = "商品名称不能为空")
    private String firstTitle;

    @ApiModelProperty(value = "商品id")
    @NotNull(message = "商品id不能为空")
    @Range(min = 1,message = "商品id必须大于0")
    private Long productId;

    @ApiModelProperty(value = "daoId")
    @NotNull(message = "daoId不能为空")
    @Range(min = 1,message = "daoId必须大于0")
    private Long daoId;

    @ApiModelProperty(value = "兑换码名称")
    private String redemptionCode;

    @ApiModelProperty(value = "兑换码生成总量")
    private Integer redemptionTotal;

    @ApiModelProperty(value = "生成规则")
    @NotNull(message = "生成规则不能为空")
    private RedemptionCodeRuleEnum redemptionCodeRule;

    @ApiModelProperty(value = "用户使用上限")
    private Integer userUseLimit;

    @ApiModelProperty("上链费配置参数")
    @NotNull(message = "上链费配置参数不能为空")
    @Valid
    private EcologyCastGasRequest ecologyCastGas;
}
